<div class='bigtitle'><?=lang('login_login')?></div>
<table class='tblcontent' cellspacing='0' cellpadding='0' border='0'>
	<tr>
		<td>
			<?=form_open(site_url('login/check'),array('name'=>'frm','onsubmit'=>'return f_submit();'),array('hidden_status'=>''))?>						
			<table width="100%" border="0" cellspacing="0" cellpadding="2" style='margin-top:10px;'>					
				<tr>
					<td width="10%" align="left"><?=lang('login_username')?>:</td>
					<td width="90%" align="left"><input name="txt_username" value="<?=$username?>" maxlength="80" type="text" style="width:150px"/></td>
				</tr>
				<tr>
					<td align="left"><?=lang('login_password')?>:</td>
					<td align="left"><input name="txt_password" maxlength="80" type="password" style="width:150px"/></td>
				</tr>
				<tr>
					<td align="left">&nbsp;</td>
					<td align="left" valign="top"><input name="btn_login" type='submit' value='<?=lang('login_login')?>'  /></td>
				</tr>	
				<tr>
					<td align="left">&nbsp;</td>
					<td align="left" class="alertmsg"><?=$errMsg;?></td>
				</tr>	                               				  
			</table>			                       
			<?=form_close()?>			
		</td>
	</tr>
</table>
<script language="javascript">
function f_submit() {
	var frm=document.frm;
	if (frm.txt_username.value==""){
		alert("<?=lang('login_js_missingusername')?>");
		frm.txt_username.focus();
		return false;
	}	
	if (frm.txt_password.value==""){
		alert("<?=lang('login_js_missingpassword')?>");
		frm.txt_password.focus();
		return false;
	}	
	frm.hidden_status.value='login';
	return true;
}
document.frm.txt_username.focus();
</script>